home *** CD-ROM | disk | FTP | other *** search
/ Almathera Ten Pack 3: CDPD 3 / Almathera Ten on Ten - Disc 3: CDPD3.iso / fish / 726-750 / 735 / powervisor / docs / help.doc < prev    next >
Text File  |  1995-03-18  |  19KB  |  478 lines

  1. ==============================================================================
  2.  
  3.         Quick HELP                      V2.0
  4.         © J.Tyberghein                  Mon Nov 12 12:17:09 1990
  5.  
  6. ==============================================================================
  7.  
  8.  
  9.  
  10. Preface
  11. -------
  12.   These programs are intended for everyone. They are extremely useful
  13.   if you are, for example, a programmer and you have some help-files.
  14.  
  15.   Suppose that you want to know the syntax of the EXEC AllocMem command.
  16.   Normally you would start an editor (or use the one which is already in
  17.   memory) and load the corresponding help-file. (You can of course 'type'
  18.   them, but this can be very timeconsuming if the help-file is big)
  19.   Then you must search the right entry in this help-file.
  20.   This may look easy to you, but sometimes it's just difficult enough to
  21.   refrain you from using such help-files.
  22.  
  23.   These three utilites (MakeHelp, Help and ArcFiles) allow you to
  24.   make your own help-files. When this is done you simply type
  25.   'Help AllocMem' and there comes your information !
  26.  
  27.   To guarantee maximum flexibility these programs are able to read files
  28.   crunched with the PowerPacker (Author Nico François).
  29.   You can crunch each help-file individually and then archive them in
  30.   one big file. The advantage of this is that the resulting file will
  31.   be smaller than the sum of the original files (although a bit bigger
  32.   than if you had crunched them all together), but it will only be necessary
  33.   to decrunch the individual files when needed (of course this will be
  34.   done automatically for you).
  35.   To guarantee an even greater amount of flexibility you can show the
  36.   information you want in every editor you like. (The ouput will be
  37.   put in a temporary file and the editor will automatically be
  38.   invoked with this file)
  39.   And in case you have PPMore (also by Nico François), the biggest
  40.   amount of flexibility is likely to be yours. For in that case there
  41.   is no additional overhead for using a temporary file.
  42.  
  43.   These programs (Help, MakeHelp and ArcFiles V2.0) are public domain but
  44.   contributions and some utilities are always welcome.
  45.   If you want to use any of these programs for commercial purposes please
  46.   write for permission !
  47.  
  48.   If you have any suggestions or remarks you can write to (Bug reports are
  49.   welcome too)
  50.  
  51.                             Jorrit  Tyberghein
  52.                              Hepmansbossen 31
  53.                            2450 Meerhout BELGIUM
  54.  
  55.  
  56.  
  57.   WARNING:
  58.     If you want to use this utilities you must have AmigaDOS 2.0 (or later
  59.     :-).
  60.     If you want to use the MEMORY option with PPMore (explained later) you
  61.     need PPMore version 2.0 or later.
  62.     These programs accept crunched DATA-files made by PowerPacker 1.1 or
  63.     later.
  64.     Only use Help, MakeHelp and ArcFiles if they have the same
  65.     version number (unless stated otherwise).
  66.     If you use the PROG option (in HELP), you must assign T:.
  67.     All this utilities are pure, so you can use them with 'Resident'.
  68.  
  69.  
  70.   At the end of this document you find a simple example.
  71.  
  72.  
  73. New in QuickHelp V2.0
  74. ---------------------
  75.  
  76.   ARP dependancy is removed
  77.   AmigaDOS 2.0
  78.   Made pure
  79.   New LIST option in Help
  80.   ArcFiles can extract files
  81.  
  82.  
  83. ArcFiles
  84. --------
  85.  
  86.   +---------------------------------------------------------------+
  87.   | Commandline template:                                         |
  88.   |   Files/m,TO=ARC/a,ADD/s,LIST/s,X=EXTRACT/s,FP=FULLPATH/s:    |
  89.   |---------------------------------------------------------------|
  90.   | Usage:                                                        |
  91.   |   ArcFiles { <Files>... } <TO Dest> [ADD|EXTRACT] [FULLPATH]  |
  92.   | or                                                            |
  93.   |   ArcFiles <ARC Archive> LIST                                 |
  94.   +---------------------------------------------------------------+
  95.  
  96.   This program is a small archiver. It is made especially for the
  97.   help utilities. You can use it for your own purposes if you like
  98.   (but not commercially).
  99.  
  100.     <Files>      : files to archive
  101.                    you can use all AmigaDOS wildcards
  102.                    (see the DOS documentation for more information)
  103.     <Dest>       : this is the destination for the archive
  104.     ADD          : if this option is used the <Files> will be appended
  105.                    to an existing archive <Dest>
  106.     LIST         : generate a listing of this archive
  107.                    if this option is specified <Dest> must be an
  108.                    existing archive file
  109.     EXTRACT      : extract all files matching the <Files> patterns
  110.     FULLPATH     : use this option if you want to extract the
  111.                    archive files in their directory, otherwise
  112.                    they will be extracted in the current directory
  113.  
  114.   examples:
  115.  
  116.     ArcFiles dh0:docs/#?.docs to dh0:DocArc.ppa
  117.       will archive all files in 'dh0:docs' with extension '.docs' in the file
  118.       'dh0:DocArc.ppa'. If this destination file was there already it
  119.       will be deleted.
  120.  
  121.     ArcFiles dh0:docs/#?.docs to dh0:DocArc.ppa add
  122.       will add the files in 'dh0:docs' with extension '.docs' to the
  123.       existing archive file dh0:DocArc.ppa
  124.  
  125.     ArcFiles arc dh0:DocArc.ppa list
  126.       will generate a listing of all the files in 'dh0:DocArc.ppa'.
  127.  
  128.     ArcFiles dh0:docs/Exec.doc df0:sources/#?.c to df0:ExecAndSources.ppa
  129.       will archive the file 'dh0:docs/Exec.doc' and all files in
  130.       'df0:sources' with extension '.c' in 'df0:ExecAndSources.ppa'.
  131.       Note that ArcFiles will give no warning if 'dh0:docs/Exec.doc'
  132.       does not exist. It will simply not archive it (rather obvious
  133.       isn't it ?).
  134.  
  135.     ArcFiles a#? b#? arc Archive extract fp
  136.       Extract all files from 'Archive' that start with an 'a' or a 'b'.
  137.       Use the original path name for these files.
  138.  
  139.   Arc format (V1.2, format has not changed since V1.2):
  140.  
  141.     I will give a description of the Arc format, so you can use it for
  142.     your own purposes.
  143.  
  144.     The file starts with two longwords. The first is equal to 'PPA1'.
  145.     The second is the offset in the file to where the Archive descriptor
  146.     table is located.
  147.     After these two longwords the files begin.
  148.     The archive descriptor (at the end of the file) contains the following:
  149.       A null terminated string  : the name and path name of the sub-file
  150.       A long word indicating the offset of the sub-file in this archive
  151.       A long word indicating the length of the sub-file
  152.     And this is repeated for every sub-file in the archive.
  153.     Simply check for EOF to stop scanning.
  154.  
  155.  
  156. MakeHelp
  157. --------
  158.  
  159.   +---------------------------------------------+
  160.   | Commandline template:                       |
  161.   |   From,CtrlFile,ADD/s,WORD/n,CLASS/k:       |
  162.   |---------------------------------------------|
  163.   | Usage:                                      |
  164.   |   MakeHelp <Help file> <Ctrl file> [ADD]    |
  165.   |            [WORD num] [CLASS class]         |
  166.   +---------------------------------------------+
  167.  
  168.   This program makes the help control files for you. These control
  169.   files are plain ASCII so you can add or delete lines as you wish.
  170.  
  171.     <Help file>   : the file containing the help (in a special format,
  172.                     explained below)
  173.     <Ctrl file>   : the control file to make or to adjust
  174.     ADD           : specify this option if you want to add help items
  175.                     to the control file (adjusting)
  176.     WORD num      : normally the parser searches for the first word in
  177.                     the text. This word will be the keyword for you to
  178.                     use with the help utility (see below for an example).
  179.                     With this option you can specify which word you want
  180.                     as the keyword
  181.     CLASS class   : to make the Quick Help utilities more flexible, you
  182.                     can group your help items in classes. When you use
  183.                     this option the newly added help items will be of
  184.                     class <class>. If you omit this option they will have
  185.                     class 'Misc' (from miscellaneous).
  186.  
  187.   The help-file must have the following format:
  188.  
  189.     If the help-file is a crunched or normal file:
  190.  
  191.       When you place a marker ('@') in the beginning of a line, MakeHelp
  192.       will search for the next (depending on the WORD option) word and
  193.       will start a new help item entry here. This word is then the keyword
  194.       for the Help utility.
  195.       This marker is not necessary in the beginning of the file.
  196.       At the end of the help text for this item you place '===' in the
  197.       beginning of the line. This is not necessary at the end of the file.
  198.  
  199.     If the help-file is an archive (each individual file may
  200.     be crunched):
  201.  
  202.       If each individual file in the help-file corresponds with one help
  203.       item, you need not place markers. The items are selected automatically.
  204.       In fact you can think about each individual file as a real file.
  205.       With this in your mind you can reread the previous paragraph.
  206.       If there are multiple help items in each individual file you must
  207.       place the corresponding markers (read the previous paragraph for
  208.       for more information)
  209.  
  210.   examples:
  211.  
  212.     MakeHelp dh0:docs/exec.ppa s:help.file
  213.       will make a new file 's:help.file' and add all marked help items in
  214.       the archive file 'dh0:docs/exec.ppa'. If every individual file in
  215.       the archive corresponds with one help-item, no markers are needed.
  216.  
  217.     MakeHelp dh0:docs/arexx.doc s:help.file add
  218.       will add all marked help items in the normal file 'dh0:docs/arexx.doc'
  219.       to 's:help.file'. The file 's:help.file' must already exist.
  220.  
  221.     MakeHelp dh0:docs/arexx.doc s:help.file add word 2
  222.       same as previous but we now take the second word after the marker '@'
  223.       as our keyword.
  224.  
  225.     MakeHelp dh0:docs/exec.ppa s:help.file class exec
  226.       same as the first example, but now the items will have class 'exec'
  227.       instead of 'Misc'.
  228.  
  229.   Control file format (V1.2, format has not changed since V1.2):
  230.  
  231.     There are two possible lines in a control file: an option line or
  232.     a normal line.
  233.     - An option line starts with '#'. The following options are supported:
  234.           PROG prog
  235.             When Help selects a help item after this option, the help text
  236.             will be directed to the program 'prog' (most likely an editor).
  237.             While prog is executing you can find the help text in the
  238.             file t:HelpTemp.
  239.           MEMORY prog
  240.             Same as previous option, but now there is no temporary file
  241.             needed. The help text is loaded directly in memory. At the moment
  242.             only PPMore (version 2.0 and later) supports this option (MEMORY
  243.             PPMore), but you can write your own programs to support this option
  244.             if you like. You could, for example, use this option to make an
  245.             efficient ARexx interface.
  246.             When prog is executed it will have the following argument line:
  247.               MEMVIEW <Hex address memory>,<Hex length>,<Hex options>,
  248.               <Title string>
  249.             The first three hex integers are all longwords.
  250.             If the first bit (bit 0) of the last hex integer (Hex options) is
  251.             1, you must free the memory when you are ready (With Help this
  252.             is always the case).
  253.             for example:
  254.               MEMVIEW C02310,12C0,1,Title
  255.               must be interpreted as:
  256.                 on address 0xC02310 you find my text. It is 0x12C0 bytes long
  257.                 and you must free it after you are ready. The title is
  258.                 'Title'.
  259.           RUN
  260.             Use this option if you want to run <prog> (from MEMORY or PROG)
  261.             instead of executing. (executing is the default)
  262.           NORUN
  263.             Use this option if you want to execute <prog>. (default)
  264.           STDO
  265.             When this option is used, the help text will go to the
  266.             standard Output (the CLI window).
  267.             This option overrides PROG and MEMORY and is the default.
  268.           CLASS <class>
  269.             All following help items will be of class <class>.
  270.           FILE <file>
  271.             Default file for help text (explained below).
  272.     - All other lines are help item lines.
  273.         They have the following format:
  274.           <KeyWord> '|' <File> or '*' '|' <Offset> [ '|' <individual file> ]
  275.           <KeyWord> is obvious.
  276.           <File> is the file where the help text can be found.
  277.             If <File> is a '*' the current file is taken (FILE option).
  278.           <Offset> is the offset in the file where the help text starts
  279.             if the file is not archived, and the offset in the individual
  280.             file if the file is archived.
  281.           <individual file> (only for archived files) is the individual
  282.             file where the help text can be found.
  283.         This control file format implies that:
  284.           - If you change the help-file you must change the control file,
  285.             because some offsets could change.
  286.           - If you add individual files to the help-file (an archive file in
  287.             this case) you need not change the offsets because the offsets are
  288.             relative in the individual files, and you only add another
  289.             individual file.
  290.           - If a help-file is not an archive you may freely crunch or
  291.             decrunch this file (with PowerPacker), because the offsets will
  292.             not change
  293.             (the offsets are always the offsets in the decrunched file).
  294.           - Crunched archive files are not supported (and not very useful).
  295.           - If you rename the help-file, you must change the corresponding
  296.             FILE option in the control file.
  297.  
  298.  
  299. Help
  300. ----
  301.  
  302.   +-----------------------------------------------------------------+
  303.   | Commandline template:                                           |
  304.   |   Name/a,CtrlFile,RUN/s,NORUN/s,MEMORY/k,PROG/k,STDO/s,LIST/s:  |
  305.   |-----------------------------------------------------------------|
  306.   | Usage:                                                          |
  307.   |   Help [<Class>,]<Name> [<File>] [RUN | NORUN]                  |
  308.   |        [STDO | (MEMORY | PROG) prog] [LIST]                     |
  309.   +-----------------------------------------------------------------+
  310.  
  311.   This utility gives you the help you want.
  312.  
  313.     <Name>        : this is the help item you want help about
  314.                     You will get the first corresponding help item
  315.                     HELP finds.
  316.                     Note that it is not necessary to give the full
  317.                     help item name. Case is not important either.
  318.                     You can use wildcars in <Name>.
  319.     <Class>       : if <Class> is specified HELP will look for the
  320.                     help item in this Class.
  321.                     Note that it is not necessary to give the full
  322.                     class name. Case is not important.
  323.     <File>        : control file (made by MakeHelp). 's:help.file' is
  324.                     the default.
  325.     RUN NORUN STDO MEMORY PROG RUN
  326.                   : these options are the same as the equivalent options
  327.                     in the control file. When one of these options is
  328.                     given, the corresponding control file options are
  329.                     ignored.
  330.     LIST          : Do not give help, but list all items that correspond
  331.                     with the given <Class> and <Name>.
  332.  
  333.   examples:
  334.  
  335.     Help AllocMem
  336.       gives help about the EXEC function 'AllocMem' (if your help-files and
  337.       control file are correct)
  338.  
  339.     Help NewExec,AllocMem
  340.       will give help about the EXEC function 'AllocMem' in class 'NewExec'.
  341.       (class 'NewExec' could for example contain all additions to the
  342.       'AllocMem' function in 2.0)
  343.  
  344.     Help AllocMem run memory ppmore
  345.       gives help about 'AllocMem'. HELP will run 'PPMore'. Because we used
  346.       the 'memory' option, there will be no temporary file.
  347.       Note that you can only use the 'memory' option if you have PPMore
  348.       1.3 or later.
  349.  
  350.  
  351. Global example
  352. --------------
  353.  
  354.   Suppose that I have 3 help-files, each one containing 2 help items.
  355.  
  356.     Helpfile1:
  357.       | command list
  358.       |    ... (help for list command)
  359.       | command dir
  360.       |    ... (help for dir command)
  361.  
  362.     Helpfile2:
  363.       | command copy
  364.       |    ... (help for copy)
  365.       | move
  366.       |    ... (help for move)
  367.  
  368.     Helpfile3:
  369.       | command delete
  370.       |    ... (help for delete)
  371.       | command format
  372.       |    ... (help for format)
  373.  
  374.   Fine,... I notice that each help item (like 'list','dir','copy',...) is
  375.   the second word, but I didn't realize this wasn't the case with 'move' !
  376.   I must add marks to the help-files because every help-file contains 2
  377.   help items.
  378.  
  379.     Helpfile1:
  380.       | @command list
  381.       |    ... (help for list command)
  382.       | ===
  383.       | @command dir
  384.       |    ... (help for dir command)
  385.       | ===
  386.  
  387.     Helpfile2:
  388.       | @command copy
  389.       |    ... (help for copy)
  390.       | ===
  391.       | @move
  392.       |    ... (help for move)
  393.       | ===
  394.  
  395.     Helpfile3:
  396.       | @command delete
  397.       |    ... (help for delete)
  398.       | ===
  399.       | @command format
  400.       |    ... (help for format)
  401.       | ===
  402.  
  403.   (Strange, I still didn't see that 'move' is not the second word !)
  404.   First I am going to crunch all help-files with the PowerPacker CLI
  405.   command.
  406.   So I type:
  407.  
  408.     1> crunch HelpFile#? ram:
  409.  
  410.   All my help-files are on the ram disk.
  411.  
  412.     1> dir ram:
  413.       |     t (dir)
  414.       |  helpfile1.pp                   helpfile2.pp
  415.       |  helpfile3.pp
  416.  
  417.   Now I archive them.
  418.  
  419.     1> arcfiles ram:#? to ram:HelpFiles.ppa
  420.     1> delete ram:#?.pp
  421.     1> dir ram:
  422.       |     t (dir)
  423.       |  HelpFiles.ppa
  424.  
  425.   Everything is going fine. Let's make a control file.
  426.  
  427.     1> makehelp ram:HelpFiles.ppa s:Help.File word 2 class Commands
  428.  
  429.   I have made 6 help items in class 'Commands'
  430.  
  431.     1> type s:Help.File
  432.       | #FILE ram:HelpFiles.ppa
  433.       | #CLASS Commands
  434.       | delete | * | 1 | ram:helpfile3.pp
  435.       | format | * | 80 | ram:helpfile3.pp
  436.       | list | * | 138 | ram:helpfile1.pp
  437.       | dir | * | 81 | ram:helpfile1.pp
  438.       | copy | * | 125 | ram:helpfile2.pp
  439.       | this | * | 98 | ram:helpfile2.pp
  440.  
  441.   Oops ! Something went wrong ! I didn't need a help-item named 'this' !
  442.   But this is no problem. Simply edit 's:Help.File' and change
  443.   'this' to 'move'.
  444.   So everything is allright. Let's try it.
  445.  
  446.     1> help del
  447.       | command delete
  448.       |    ... (help for delete)
  449.  
  450.   There are still two things I have to do. First I want to put the archive
  451.   'HelpFiles.ppa' on my disk, because it won't live very long on my ram disk.
  452.  
  453.     1> copy ram:HelpFiles.ppa df0:
  454.  
  455.   Now I change the FILE option in 's:Help.File'.
  456.   I add two other lines because I want the help output in the PPMore window.
  457.  
  458.     1> type s:Help.File
  459.       | #FILE df0:HelpFiles.ppa                <<<
  460.       | #MEMORY PPMore                         <<<
  461.       | #RUN                                   <<<
  462.       | #CLASS Commands
  463.       | delete | * | 1 | ram:helpfile3.pp
  464.       | format | * | 80 | ram:helpfile3.pp
  465.       | list | * | 138 | ram:helpfile1.pp
  466.       | dir | * | 81 | ram:helpfile1.pp
  467.       | copy | * | 125 | ram:helpfile2.pp
  468.       | this | * | 98 | ram:helpfile2.pp
  469.  
  470.   Everything is ready !
  471.  
  472.  
  473. ==============================================================================
  474.  
  475.                        End of Quick HELP 2.0 document
  476.  
  477. ==============================================================================
  478.